//
//  UIImage+tools.h
//  STTools
//
//  Created by stoneobs on 16/4/5.
//  Copyright © 2016年 stoneobs. All rights reserved.
//

#import <UIKit/UIKit.h>
#import <Accelerate/Accelerate.h>
@interface UIImage (STTools)

+ (UIImage*)imageWithColor:(UIColor *)color size:(CGSize)size;//通过颜色生成图片
+ (UIImage*)imageWithTwoCode:(NSString*)str andColorred:(CGFloat)red green:(CGFloat)green blue:(CGFloat)blue;//生成二维码
+ (UIImage*)imageWithDefaultTwoCode:(NSString*)str;//默认黑白二维码

+ (UIImage*)createRoundedRectImage:(UIImage*)image size:(CGSize)size radius:(NSInteger)r;//圆角图片

//毛玻璃图片
- (UIImage *)blurryImage:(UIImage *)image withBlurLevel:(CGFloat)blur;
//合适的缩放
- (UIImage *) imageCompressForSize:(UIImage *)sourceImage targetSize:(CGSize)size;
@end
